Conversation
|
@pippellia-btc here is a quick first draft based on our discussions in #87 and nostr-protocol/nips#2187. I would appreciate feedback when you have the time I haven't added any requirements or recommendations in to mitigate the issue with |
|
Hey man, here are the things I like:
Here are things that I think are confusing or need more polishing:
Now, even though this sounds good in theory, in practice this creates complex situations when the hash of the blob must be computed from the request body, which is the case in Another idea would be to remove the Tags "Refactor"I though about this way to "refactor" the auth tags.
old event "tags": [
["t", "upload"],
["x", "b16741...53"], // <--- have to buffer the body to validate this
["expiration", "1708858680"]
],(possible) new event UPLOAD "tags": [
["path", "/upload"],
["method", "PUT"],
["expiration", "1708858680"]
],(possible) new event DELETE "tags": [
["path", "/b16741...53"], // <--- commits to the blob being deleted
["method", "DELETE"],
["expiration", "1708858680"]
],Obviously this is a breaking change, but IMO it's worth it to make things right. Nostr and Blossom are super small compared to what they might become, which means there will never be a better time to build solid foundations, yes, even at the cost of breaking old stuff. |
|
As we agreed during our call, @hzrd149, my proposed solution would make
One interesting idea to make verification cheaper and more self-contained is as follows: This doesn't change the nature of the commitment, but it allows for better separation of concerns and, in my opinion, simpler code. The reasons are: In the framework I am building, this change would simplify the code by allowing for a more straightforward separation of concerns.
Currently, steps 2. and 5. are intertwined, which, in my opinion, makes things harder to understand. |
|
I like the flexibility of making the x and server optional. Removing the x from the auth event would allow delegating the auth event to a DVM and to allow uploading in the name of the user. For transcoding usecases the hash is not known beforehand. |
This could be useful. bun I dont like the idea of users (or clients asking users) to give away free upload tokens. its asking to be exploited even if they set the expiration to something really aggressive At least for now I think it makes sense to keep the requirement for the |
|
I agree with @flox1an. The @hzrd149 if we take seriously the idea that users are authorizing something (and not authenticating with someone), then the authorization should be expressive, allowing maximum freedom, even freedom to shoot yourself in the foot. Otherwise clients / servers will eventually just diverge from the spec if they need this freedom for their usecases |
|
Removing the requirement for the Once we allow uploads without requiring the x tag, that becomes the easiest implementation path for apps uploading to servers. Developers and especially AI agents tend to choose the simplest solution to get a feature working.
|
…safe format without padding
The PR moves the optional authorization out into its own BUD and clarifies the role of the
xandservertagsReadable Version